<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateHairAssetsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('hair_assets', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('customer_id');
			$table->string('asset_title')->nullable()->comment('素材标题');
			$table->integer('sort')->default(0)->comment('排序');
			$table->string('hair_preview')->comment('发型预览图');
			$table->string('assets_dir')->comment('存放2.5d试戴素材的目录,前端获取通过assets_dir找bos上的文件');
			$table->string('assets_bin')->comment('当前目录下的.bin文件，前端获取通过assets_dir找bos上的文件');
			$table->string('assets_png')->comment('当前目录下的.png文件');
			$table->boolean('gender')->default(0)->comment('姓别 1： 男 ， 2： 女 ，  0： 未知');
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('hair_assets');
	}

}
